3.2.9 \(\int \frac {a g+e x-c g x^4}{(a+b x^2+c x^4)^{3/2}} \, dx\) [109]

Optimal. Leaf size=57 \[ \frac {g x}{\sqrt {a+b x^2+c x^4}}-\frac {e \left (b+2 c x^2\right )}{\left (b^2-4 a c\right ) \sqrt {a+b x^2+c x^4}} \]

[Out]

g*x/(c*x^4+b*x^2+a)^(1/2)-e*(2*c*x^2+b)/(-4*a*c+b^2)/(c*x^4+b*x^2+a)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 57, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.161, Rules used = {1687, 1602, 12, 1121, 627} \begin {gather*} \frac {g x}{\sqrt {a+b x^2+c x^4}}-\frac {e \left (b+2 c x^2\right )}{\left (b^2-4 a c\right ) \sqrt {a+b x^2+c x^4}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a*g + e*x - c*g*x^4)/(a + b*x^2 + c*x^4)^(3/2),x]

[Out]

(g*x)/Sqrt[a + b*x^2 + c*x^4] - (e*(b + 2*c*x^2))/((b^2 - 4*a*c)*Sqrt[a + b*x^2 + c*x^4])

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 627

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-3/2), x_Symbol] :> Simp[-2*((b + 2*c*x)/((b^2 - 4*a*c)*Sqrt[a + b*x
+ c*x^2])), x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 1121

Int[(x_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Dist[1/2, Subst[Int[(a + b*x + c*x^2)^p, x],
 x, x^2], x] /; FreeQ[{a, b, c, p}, x]

Rule 1602

Int[(Pp_)*(Qq_)^(m_.), x_Symbol] :> With[{p = Expon[Pp, x], q = Expon[Qq, x]}, Simp[Coeff[Pp, x, p]*x^(p - q +
 1)*(Qq^(m + 1)/((p + m*q + 1)*Coeff[Qq, x, q])), x] /; NeQ[p + m*q + 1, 0] && EqQ[(p + m*q + 1)*Coeff[Qq, x,
q]*Pp, Coeff[Pp, x, p]*x^(p - q)*((p - q + 1)*Qq + (m + 1)*x*D[Qq, x])]] /; FreeQ[m, x] && PolyQ[Pp, x] && Pol
yQ[Qq, x] && NeQ[m, -1]

Rule 1687

Int[(Pq_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> Module[{q = Expon[Pq, x], k}, Int[Sum[Coeff[
Pq, x, 2*k]*x^(2*k), {k, 0, q/2}]*(a + b*x^2 + c*x^4)^p, x] + Int[x*Sum[Coeff[Pq, x, 2*k + 1]*x^(2*k), {k, 0,
(q - 1)/2}]*(a + b*x^2 + c*x^4)^p, x]] /; FreeQ[{a, b, c, p}, x] && PolyQ[Pq, x] &&  !PolyQ[Pq, x^2]

Rubi steps

\begin {align*} \int \frac {a g+e x-c g x^4}{\left (a+b x^2+c x^4\right )^{3/2}} \, dx &=\int \frac {e x}{\left (a+b x^2+c x^4\right )^{3/2}} \, dx+\int \frac {a g-c g x^4}{\left (a+b x^2+c x^4\right )^{3/2}} \, dx\\ &=\frac {g x}{\sqrt {a+b x^2+c x^4}}+e \int \frac {x}{\left (a+b x^2+c x^4\right )^{3/2}} \, dx\\ &=\frac {g x}{\sqrt {a+b x^2+c x^4}}+\frac {1}{2} e \text {Subst}\left (\int \frac {1}{\left (a+b x+c x^2\right )^{3/2}} \, dx,x,x^2\right )\\ &=\frac {g x}{\sqrt {a+b x^2+c x^4}}-\frac {e \left (b+2 c x^2\right )}{\left (b^2-4 a c\right ) \sqrt {a+b x^2+c x^4}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 10.10, size = 51, normalized size = 0.89 \begin {gather*} \frac {-b e+b^2 g x-4 a c g x-2 c e x^2}{\left (b^2-4 a c\right ) \sqrt {a+b x^2+c x^4}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a*g + e*x - c*g*x^4)/(a + b*x^2 + c*x^4)^(3/2),x]

[Out]

(-(b*e) + b^2*g*x - 4*a*c*g*x - 2*c*e*x^2)/((b^2 - 4*a*c)*Sqrt[a + b*x^2 + c*x^4])

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 4 vs. order 2.
time = 0.05, size = 974, normalized size = 17.09

method result size
gosper \(\frac {4 a c g x -b^{2} g x +2 c e \,x^{2}+e b}{\sqrt {c \,x^{4}+b \,x^{2}+a}\, \left (4 a c -b^{2}\right )}\) \(52\)
trager \(\frac {4 a c g x -b^{2} g x +2 c e \,x^{2}+e b}{\sqrt {c \,x^{4}+b \,x^{2}+a}\, \left (4 a c -b^{2}\right )}\) \(52\)
elliptic \(\frac {e \left (2 c \,x^{2}+b \right )}{\sqrt {c \,x^{4}+b \,x^{2}+a}\, \left (4 a c -b^{2}\right )}+\frac {g x}{\sqrt {c \,x^{4}+b \,x^{2}+a}}\) \(55\)
default \(-c g \left (-\frac {2 c \left (\frac {b \,x^{3}}{2 c \left (4 a c -b^{2}\right )}+\frac {a x}{c \left (4 a c -b^{2}\right )}\right )}{\sqrt {\left (x^{4}+\frac {b \,x^{2}}{c}+\frac {a}{c}\right ) c}}+\frac {a \sqrt {2}\, \sqrt {4-\frac {2 \left (-b +\sqrt {-4 a c +b^{2}}\right ) x^{2}}{a}}\, \sqrt {4+\frac {2 \left (b +\sqrt {-4 a c +b^{2}}\right ) x^{2}}{a}}\, \EllipticF \left (\frac {x \sqrt {2}\, \sqrt {\frac {-b +\sqrt {-4 a c +b^{2}}}{a}}}{2}, \frac {\sqrt {-4+\frac {2 b \left (b +\sqrt {-4 a c +b^{2}}\right )}{a c}}}{2}\right )}{2 \left (4 a c -b^{2}\right ) \sqrt {\frac {-b +\sqrt {-4 a c +b^{2}}}{a}}\, \sqrt {c \,x^{4}+b \,x^{2}+a}}-\frac {b a \sqrt {2}\, \sqrt {4-\frac {2 \left (-b +\sqrt {-4 a c +b^{2}}\right ) x^{2}}{a}}\, \sqrt {4+\frac {2 \left (b +\sqrt {-4 a c +b^{2}}\right ) x^{2}}{a}}\, \left (\EllipticF \left (\frac {x \sqrt {2}\, \sqrt {\frac {-b +\sqrt {-4 a c +b^{2}}}{a}}}{2}, \frac {\sqrt {-4+\frac {2 b \left (b +\sqrt {-4 a c +b^{2}}\right )}{a c}}}{2}\right )-\EllipticE \left (\frac {x \sqrt {2}\, \sqrt {\frac {-b +\sqrt {-4 a c +b^{2}}}{a}}}{2}, \frac {\sqrt {-4+\frac {2 b \left (b +\sqrt {-4 a c +b^{2}}\right )}{a c}}}{2}\right )\right )}{2 \left (4 a c -b^{2}\right ) \sqrt {\frac {-b +\sqrt {-4 a c +b^{2}}}{a}}\, \sqrt {c \,x^{4}+b \,x^{2}+a}\, \left (b +\sqrt {-4 a c +b^{2}}\right )}\right )+a g \left (-\frac {2 c \left (\frac {b \,x^{3}}{2 a \left (4 a c -b^{2}\right )}-\frac {\left (2 a c -b^{2}\right ) x}{2 a \left (4 a c -b^{2}\right ) c}\right )}{\sqrt {\left (x^{4}+\frac {b \,x^{2}}{c}+\frac {a}{c}\right ) c}}+\frac {\left (\frac {1}{a}-\frac {2 a c -b^{2}}{a \left (4 a c -b^{2}\right )}\right ) \sqrt {2}\, \sqrt {4-\frac {2 \left (-b +\sqrt {-4 a c +b^{2}}\right ) x^{2}}{a}}\, \sqrt {4+\frac {2 \left (b +\sqrt {-4 a c +b^{2}}\right ) x^{2}}{a}}\, \EllipticF \left (\frac {x \sqrt {2}\, \sqrt {\frac {-b +\sqrt {-4 a c +b^{2}}}{a}}}{2}, \frac {\sqrt {-4+\frac {2 b \left (b +\sqrt {-4 a c +b^{2}}\right )}{a c}}}{2}\right )}{4 \sqrt {\frac {-b +\sqrt {-4 a c +b^{2}}}{a}}\, \sqrt {c \,x^{4}+b \,x^{2}+a}}-\frac {b c \sqrt {2}\, \sqrt {4-\frac {2 \left (-b +\sqrt {-4 a c +b^{2}}\right ) x^{2}}{a}}\, \sqrt {4+\frac {2 \left (b +\sqrt {-4 a c +b^{2}}\right ) x^{2}}{a}}\, \left (\EllipticF \left (\frac {x \sqrt {2}\, \sqrt {\frac {-b +\sqrt {-4 a c +b^{2}}}{a}}}{2}, \frac {\sqrt {-4+\frac {2 b \left (b +\sqrt {-4 a c +b^{2}}\right )}{a c}}}{2}\right )-\EllipticE \left (\frac {x \sqrt {2}\, \sqrt {\frac {-b +\sqrt {-4 a c +b^{2}}}{a}}}{2}, \frac {\sqrt {-4+\frac {2 b \left (b +\sqrt {-4 a c +b^{2}}\right )}{a c}}}{2}\right )\right )}{2 \left (4 a c -b^{2}\right ) \sqrt {\frac {-b +\sqrt {-4 a c +b^{2}}}{a}}\, \sqrt {c \,x^{4}+b \,x^{2}+a}\, \left (b +\sqrt {-4 a c +b^{2}}\right )}\right )+\frac {e \left (2 c \,x^{2}+b \right )}{\sqrt {c \,x^{4}+b \,x^{2}+a}\, \left (4 a c -b^{2}\right )}\) \(974\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-c*g*x^4+a*g+e*x)/(c*x^4+b*x^2+a)^(3/2),x,method=_RETURNVERBOSE)

[Out]

-c*g*(-2*c*(1/2*b/c/(4*a*c-b^2)*x^3+a/c/(4*a*c-b^2)*x)/((x^4+b/c*x^2+a/c)*c)^(1/2)+1/2*a/(4*a*c-b^2)*2^(1/2)/(
(-b+(-4*a*c+b^2)^(1/2))/a)^(1/2)*(4-2*(-b+(-4*a*c+b^2)^(1/2))/a*x^2)^(1/2)*(4+2*(b+(-4*a*c+b^2)^(1/2))/a*x^2)^
(1/2)/(c*x^4+b*x^2+a)^(1/2)*EllipticF(1/2*x*2^(1/2)*((-b+(-4*a*c+b^2)^(1/2))/a)^(1/2),1/2*(-4+2*b*(b+(-4*a*c+b
^2)^(1/2))/a/c)^(1/2))-1/2*b/(4*a*c-b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(1/2))-EllipticE(1/2*x*2^(1/2)*((-b+(-4*a*c+b^2)^(1/2))/a)^(1/2),1/2*(-4+2*b*(b+(-4*a*c+b^2)^(1/2))/a/c)^(1/2
))))+e/(c*x^4+b*x^2+a)^(1/2)*(2*c*x^2+b)/(4*a*c-b^2)

________________________________________________________________________________________

Maxima [A]
time = 0.33, size = 53, normalized size = 0.93 \begin {gather*} -\frac {2 \, c x^{2} e - {\left (b^{2} g - 4 \, a c g\right )} x + b e}{\sqrt {c x^{4} + b x^{2} + a} {\left (b^{2} - 4 \, a c\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-c*g*x^4+a*g+e*x)/(c*x^4+b*x^2+a)^(3/2),x, algorithm="maxima")

[Out]

-(2*c*x^2*e - (b^2*g - 4*a*c*g)*x + b*e)/(sqrt(c*x^4 + b*x^2 + a)*(b^2 - 4*a*c))

________________________________________________________________________________________

Fricas [A]
time = 0.40, size = 82, normalized size = 1.44 \begin {gather*} -\frac {\sqrt {c x^{4} + b x^{2} + a} {\left (2 \, c e x^{2} - {\left (b^{2} - 4 \, a c\right )} g x + b e\right )}}{{\left (b^{2} c - 4 \, a c^{2}\right )} x^{4} + a b^{2} - 4 \, a^{2} c + {\left (b^{3} - 4 \, a b c\right )} x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-c*g*x^4+a*g+e*x)/(c*x^4+b*x^2+a)^(3/2),x, algorithm="fricas")

[Out]

-sqrt(c*x^4 + b*x^2 + a)*(2*c*e*x^2 - (b^2 - 4*a*c)*g*x + b*e)/((b^2*c - 4*a*c^2)*x^4 + a*b^2 - 4*a^2*c + (b^3
 - 4*a*b*c)*x^2)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \int \left (- \frac {a g}{a \sqrt {a + b x^{2} + c x^{4}} + b x^{2} \sqrt {a + b x^{2} + c x^{4}} + c x^{4} \sqrt {a + b x^{2} + c x^{4}}}\right )\, dx - \int \left (- \frac {e x}{a \sqrt {a + b x^{2} + c x^{4}} + b x^{2} \sqrt {a + b x^{2} + c x^{4}} + c x^{4} \sqrt {a + b x^{2} + c x^{4}}}\right )\, dx - \int \frac {c g x^{4}}{a \sqrt {a + b x^{2} + c x^{4}} + b x^{2} \sqrt {a + b x^{2} + c x^{4}} + c x^{4} \sqrt {a + b x^{2} + c x^{4}}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-c*g*x**4+a*g+e*x)/(c*x**4+b*x**2+a)**(3/2),x)

[Out]

-Integral(-a*g/(a*sqrt(a + b*x**2 + c*x**4) + b*x**2*sqrt(a + b*x**2 + c*x**4) + c*x**4*sqrt(a + b*x**2 + c*x*
*4)), x) - Integral(-e*x/(a*sqrt(a + b*x**2 + c*x**4) + b*x**2*sqrt(a + b*x**2 + c*x**4) + c*x**4*sqrt(a + b*x
**2 + c*x**4)), x) - Integral(c*g*x**4/(a*sqrt(a + b*x**2 + c*x**4) + b*x**2*sqrt(a + b*x**2 + c*x**4) + c*x**
4*sqrt(a + b*x**2 + c*x**4)), x)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 142 vs. \(2 (54) = 108\).
time = 4.65, size = 142, normalized size = 2.49 \begin {gather*} -\frac {{\left (\frac {2 \, {\left (b^{2} c e - 4 \, a c^{2} e\right )} x}{b^{4} - 8 \, a b^{2} c + 16 \, a^{2} c^{2}} - \frac {b^{4} g - 8 \, a b^{2} c g + 16 \, a^{2} c^{2} g}{b^{4} - 8 \, a b^{2} c + 16 \, a^{2} c^{2}}\right )} x + \frac {b^{3} e - 4 \, a b c e}{b^{4} - 8 \, a b^{2} c + 16 \, a^{2} c^{2}}}{\sqrt {c x^{4} + b x^{2} + a}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-c*g*x^4+a*g+e*x)/(c*x^4+b*x^2+a)^(3/2),x, algorithm="giac")

[Out]

-((2*(b^2*c*e - 4*a*c^2*e)*x/(b^4 - 8*a*b^2*c + 16*a^2*c^2) - (b^4*g - 8*a*b^2*c*g + 16*a^2*c^2*g)/(b^4 - 8*a*
b^2*c + 16*a^2*c^2))*x + (b^3*e - 4*a*b*c*e)/(b^4 - 8*a*b^2*c + 16*a^2*c^2))/sqrt(c*x^4 + b*x^2 + a)

________________________________________________________________________________________

Mupad [B]
time = 0.93, size = 51, normalized size = 0.89 \begin {gather*} \frac {-g\,b^2\,x+e\,b+2\,c\,e\,x^2+4\,a\,c\,g\,x}{\left (4\,a\,c-b^2\right )\,\sqrt {c\,x^4+b\,x^2+a}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a*g + e*x - c*g*x^4)/(a + b*x^2 + c*x^4)^(3/2),x)

[Out]

(b*e + 2*c*e*x^2 - b^2*g*x + 4*a*c*g*x)/((4*a*c - b^2)*(a + b*x^2 + c*x^4)^(1/2))

________________________________________________________________________________________